<?php
	if(is_array($_POST['post_id'])) {
		$gallery_id = $_POST['gallery_id'];
		$sql = "DELETE FROM `tbl_product_gallery` WHERE  `gallery_id`  IN (". implode (',',$gallery_id) .")";
	} else {
		$gallery_id = $params[2];
		$sql = "DELETE FROM `tbl_product_gallery` WHERE  `gallery_id` = '$gallery_id' LIMIT 1";
	}
	mysql_query($sql);
	exit;
?>